<template>
  <div style="min-height: 500px">
    <el-table :data="state.roleData" border style="width: 100%">
      <el-table-column label="角色名称" prop="roleName"></el-table-column>
    </el-table>
  </div>
</template>

<script setup name="pageRole">
import request from '/@/utils/request';
import {reactive, ref, onMounted, defineAsyncComponent, defineProps} from "vue";

let props = defineProps({
  pageId : {type : Number, default: 0}
})

const state = reactive({
  roleData :[],
})
const loadPageRole = () =>{
  request({
    url: '/pageadmin/listpagerole',
    data: {pageId : props.pageId}
  }).then(res => {
    const { data } = res
    state.roleData = data
  })
}
onMounted(()=>{
  loadPageRole();
})
</script>
<style scoped>

</style>
